"humburger animation"
Bootstrap 4.1.1 Snippet by ALIMUL AL RAZY

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<a id="nav-toggle" href="#"><span></span></a>
<div class="box">
<div class="content">
<ul>
<li>Link 1</li>
<li>Link 2</li>
<li>Link 3</li>
<li>Link 4</li>
</ul>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.2/TweenMax.min.js"></script>
<script>
// menu
var box = document.querySelector(".box");
var elements = document.querySelector("#nav-toggle");
var open = false;
var tl = new TimelineMax();
tl.pause();
tl.fromTo(box, .7, {x: -2000, ease: Expo.easeOut}, {x: 0}, 0.2);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@import url(https://fonts.googleapis.com/css?family=Lato:300,400);
body{
font-family: 'Lato';
font-size: 20px;
background-color: #2e2e2e;
color: #fff;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
.box{
display: flex;
width: 100vw;
height: 100vh;
background-color: black;
color: white;
justify-content: center;
align-items: center;
}
.content{
font-size: 18pt;
}
ul{
list-style-type: none;
}
li{
margin-bottom: 15px;
}
#nav-toggle {
background: transparent;
position: absolute;
right: 0;
top: 5%;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: